/*
 * @Author: 张笑天
 * @Date: 2018-03-07 17:11:10
 * @Last Modified by: lyuan2018
 * @Last Modified time: 2020-08-19 15:23:00
 */
import { listRoute, nameUpperCase } from '../util/index';
import EmailMainStore from './main';
import EmailNewStore from './new';
import EmailCreateGroupStore from './new/creatGroup';
import EmailListStore from './list/list';
import EmailOpsStore from './ops';
import SettingStore from './emailSetting';
import EmailAttachmentStore from './attachment';
import EmailMonitorStore from './monitor/monitor';
import EmailMonitorLogStore from './monitor/monitorLog';
import EmailContactStore from './emailContact';
import EmailMenuStore from './menu';
import EmailPrintStore from './EmailPrintStore';
import TodoNewStore from './TodoNew';
import StaticViewStore from './staticView';
import FilePreviewStore from './filePreview';

const listStores = {};
listRoute.forEach((l) => {
  listStores[`email${nameUpperCase(l)}Store`] = new EmailListStore(l);
});

const emailMainStore = new EmailMainStore();
const emailNewStore = new EmailNewStore();
const emailCreateGroupStore = new EmailCreateGroupStore();
const emailOpsStore = new EmailOpsStore();
const emailAttachmentStore = new EmailAttachmentStore();
const emailMonitorStore = new EmailMonitorStore();
const emailMonitorLogStore = new EmailMonitorLogStore();
const emailContactStore = new EmailContactStore();
const emailMenuStore = new EmailMenuStore();
const emailPrintStore = new EmailPrintStore();
const settingStore = new SettingStore();
const todoNewStore = new TodoNewStore();
const staticViewStore = new StaticViewStore();
const filePreviewStore = new FilePreviewStore();

module.exports = {
  emailMainStore,
  emailNewStore,
  emailOpsStore,
  ...listStores,
  emailAttachmentStore,
  emailMonitorStore,
  emailMonitorLogStore,
  emailCreateGroupStore,
  emailMenuStore,
  emailPrintStore,
  settingStore,
  todoNewStore,
  staticViewStore,
  emailContactStore,
  filePreviewStore,
};
